package discov

import "sync"

type driver interface {
	start(*Options) error
	stop()
	watch(h WatchHandler, k string, id int64) error
	update(k, v string) error
	put(k, v string) error
	del(k string) (string, error)
	get(k string) (int64, []string, error)
	getLocker(key string) sync.Locker
	lockDo(k string, f func() error) error
}

var _driverMp = map[string]func() driver{
	"etcd": newEtcd,
}

var _gService driver
